// Scintilla source code edit control
/** @file CharClassify.cxx
 ** Character classifications used by Document and RESearch.
 **/
// Copyright 2006 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.

#include <cstdlib>
#include <cstdint>
#include <cassert>
#include <cstring>

#include "ILexer.h"

#include "CharacterSet.h"
#include "CharClassify.h"

using namespace Scintilla;
using namespace Scintilla::Internal;
using namespace Lexilla;

namespace Scintilla::Internal {

bool DBCSIsLeadByte(int codePage, unsigned char uch) noexcept {
	// Byte ranges found in Wikipedia articles with relevant search strings in each case
	switch (codePage) {
	case 932:
		// Shift_jis
		return ((uch >= 0x81) && (uch <= 0x9F)) ||
			((uch >= 0xE0) && (uch <= 0xFC));
		// Lead bytes F0 to FC may be a Microsoft addition.
	case 936:
		// GBK
		return (uch >= 0x81) && (uch <= 0xFE);
	case 949:
		// Korean Wansung KS C-5601-1987
		return (uch >= 0x81) && (uch <= 0xFE);
	case 950:
		// Big5
		return (uch >= 0x81) && (uch <= 0xFE);
	case 1361:
		// Korean Johab KS C-5601-1992
		return
			((uch >= 0x84) && (uch <= 0xD3)) ||
			((uch >= 0xD8) && (uch <= 0xDE)) ||
			((uch >= 0xE0) && (uch <= 0xF9));
	}
	return false;
}

}

CharClassify::CharClassify() noexcept {
	SetDefaultCharClasses(true);
}

void CharClassify::SetDefaultCharClasses(bool includeWordClass) noexcept {
	// Initialize all char classes to default values
	for (int ch = 0; ch < 127; ch++) {
		CharacterClass cc;
		if (ch <= ' ') {
			cc = IsEOLChar(ch) ? CharacterClass::newLine : CharacterClass::space;
		} else if (includeWordClass && (IsAlphaNumeric(ch) || ch == '_')) {
			cc = CharacterClass::word;
		} else {
			cc = CharacterClass::punctuation;
		}
		charClass[ch] = static_cast<uint8_t>(cc);
	}

	const CharacterClass cc = includeWordClass ? CharacterClass::word : CharacterClass::punctuation;
	charClass[127] = static_cast<uint8_t>(CharacterClass::space);
	memset(charClass + 128, static_cast<int>(cc), 128);
}

void CharClassify::SetCharClasses(const unsigned char *chars, CharacterClass newCharClass) noexcept {
	// Apply the newCharClass to the specified chars
	if (chars) {
		while (*chars) {
			charClass[*chars] = static_cast<uint8_t>(newCharClass);
			chars++;
		}
	}
}

void CharClassify::SetCharClassesEx(const unsigned char *chars, size_t length) noexcept {
	if (chars == nullptr || length == 0) {
		memset(charClass + 128, static_cast<int>(CharacterClass::word), 128);
	} else {
		assert(length == 32);
		uint8_t *ptr = charClass + 128;
		for (size_t i = 0; i < length; i++) {
			const uint8_t cc = chars[i];
			ptr[0] = cc & 3;
			ptr[1] = (cc >> 2) & 3;
			ptr[2] = (cc >> 4) & 3;
			ptr[3] = cc >> 6;
			ptr += 4;
		}
	}
}

int CharClassify::GetCharsOfClass(CharacterClass characterClass, unsigned char *buffer) const noexcept {
	// Get characters belonging to the given char class; return the number
	// of characters (if the buffer is NULL, don't write to it).
	int count = 0;
	for (int ch = maxChar - 1; ch >= 0; --ch) {
		if (static_cast<CharacterClass>(charClass[ch]) == characterClass) {
			++count;
			if (buffer) {
				*buffer = static_cast<unsigned char>(ch);
				buffer++;
			}
		}
	}
	return count;
}

namespace {

template <typename DataType, size_t DataSize, typename ValueType, size_t BufferSize>
void ExpandRLE2(const DataType (&data)[DataSize], ValueType (&buffer)[BufferSize]) noexcept {
	constexpr int ValueBit = 2;
	constexpr DataType mask = (1 << ValueBit) - 1;
	ValueType *p = buffer;

	for (DataType count : data) {
		const ValueType value = count & mask;
		count >>= ValueBit;
		assert(p + count <= buffer + BufferSize);
		memset(p, value, count);
		p += count;
	}
	// ensure full expanded
	assert(p == buffer + BufferSize);
}

template <typename DataType, size_t DataSize, typename ValueType, size_t BufferSize>
void ExpandRLE3(const DataType (&data)[DataSize], ValueType (&buffer)[BufferSize]) noexcept {
	constexpr int ValueBit = 3;
	constexpr DataType mask = (1 << ValueBit) - 1;
	ValueType *p = buffer;

	for (DataType count : data) {
		const ValueType value = count & mask;
		count >>= ValueBit;
		assert(p + count <= buffer + BufferSize);
		memset(p, value, count);
		p += count;
	}
	// ensure full expanded
	assert(p == buffer + BufferSize);
}

template <typename IndexType, size_t IndexSize, typename ValueType, size_t DataSize, size_t BufferSize>
void ExpandRunBlock(const IndexType (&indexList)[IndexSize], const ValueType (&blockData)[DataSize], ValueType (&buffer)[BufferSize],
	uint32_t indexBit, uint32_t blockBit) noexcept {
	const uint32_t indexMask = (1 << indexBit) - 1;
	const uint32_t blockSize = 1 << blockBit;

	ValueType *p = buffer;
	for (uint32_t count : indexList) {
		const uint32_t index = (count & indexMask) << blockBit;
		count >>= indexBit;
		assert(index + blockSize <= DataSize);
		assert(count != 0);
		do {
			assert(p + blockSize <= buffer + BufferSize);
			memcpy(p, blockData + index, blockSize);
			p += blockSize;
		} while (--count);
	}
	// ensure full expanded
	assert(p == buffer + BufferSize);
}

template <typename IndexType, size_t IndexSize, typename ValueType, size_t DataSize, size_t BufferSize>
void ExpandSkipBlock(const IndexType (&indexList)[IndexSize], const ValueType (&blockData)[DataSize], ValueType (&buffer)[BufferSize],
	uint32_t indexBit, uint32_t blockBit, ValueType defaultValue = 0) noexcept {
	const uint32_t indexMask = (1 << indexBit) - 1;
	const uint32_t blockSize = 1 << blockBit;

	memset(buffer, BufferSize, defaultValue);
	for (uint32_t offset : indexList) {
		const uint32_t index = (offset & indexMask) << blockBit;
		offset = (offset >> indexBit) << blockBit;
		assert(offset + blockSize <= BufferSize);
		assert(index + blockSize <= DataSize);
		memcpy(buffer + offset, blockData + index, blockSize);
	}
}

//++Autogenerated -- start of section automatically generated
// Created with Python 3.13.0, Unicode 15.1.0
const uint16_t CharClassifyRLE_BMP[] = {
264, 122, 83, 58, 211, 50, 211, 34, 272, 74, 11, 18, 8, 34, 19, 10, 11, 26, 19, 10,
27, 10, 187, 10, 251, 10, 3667, 34, 99, 114, 43, 58, 11, 10, 11, 138, 939, 10, 19, 16,
35, 10, 11, 32, 18, 11, 10, 27, 8, 11, 8, 163, 8, 667, 10, 1115, 10, 1387, 8, 307,
16, 11, 50, 331, 18, 16, 26, 8, 363, 10, 11, 10, 19, 10, 19, 10, 11, 64, 219, 32,
35, 18, 136, 82, 91, 10, 8, 26, 595, 34, 819, 10, 67, 8, 10, 83, 10, 155, 18, 11,
114, 16, 475, 16, 811, 112, 435, 34, 11, 16, 11, 18, 371, 16, 122, 8, 227, 16, 10, 8,
91, 40, 195, 10, 51, 72, 595, 8, 1035, 18, 83, 10, 155, 8, 67, 16, 19, 16, 179, 8,
59, 8, 11, 24, 35, 16, 75, 16, 19, 16, 35, 64, 11, 32, 19, 8, 43, 16, 99, 18,
51, 18, 11, 10, 11, 16, 27, 8, 51, 32, 19, 16, 179, 8, 59, 8, 19, 8, 19, 8,
19, 16, 11, 8, 43, 32, 19, 16, 27, 24, 11, 56, 35, 8, 11, 56, 131, 10, 80, 27,
8, 75, 8, 27, 8, 179, 8, 59, 8, 19, 8, 43, 16, 83, 8, 27, 8, 27, 16, 11,
120, 35, 16, 83, 18, 56, 59, 8, 27, 8, 67, 16, 19, 16, 179, 8, 59, 8, 19, 8,
43, 16, 75, 16, 19, 16, 27, 56, 27, 32, 19, 8, 43, 16, 83, 10, 59, 80, 19, 8,
51, 24, 27, 8, 35, 24, 19, 8, 11, 8, 19, 24, 19, 24, 27, 24, 99, 32, 43, 24,
27, 8, 35, 16, 11, 48, 11, 112, 107, 66, 40, 107, 8, 27, 8, 187, 8, 131, 16, 75,
8, 27, 8, 35, 56, 19, 8, 27, 16, 11, 16, 35, 16, 83, 56, 10, 59, 10, 35, 10,
67, 8, 27, 8, 187, 8, 83, 8, 43, 16, 75, 8, 27, 8, 35, 56, 19, 48, 19, 8,
35, 16, 83, 8, 27, 96, 107, 8, 27, 8, 411, 8, 27, 8, 43, 10, 32, 131, 16, 155,
10, 51, 8, 27, 8, 147, 24, 195, 8, 75, 8, 11, 16, 59, 24, 11, 32, 51, 8, 11,
8, 67, 48, 83, 16, 19, 10, 96, 467, 32, 10, 123, 10, 83, 18, 296, 19, 8, 11, 8,
43, 8, 195, 8, 11, 8, 187, 16, 43, 8, 11, 8, 59, 8, 83, 16, 35, 256, 11, 186,
19, 50, 163, 10, 11, 10, 11, 10, 11, 34, 83, 8, 291, 32, 163, 10, 147, 8, 291, 8,
66, 11, 50, 8, 106, 296, 595, 50, 627, 18, 307, 8, 11, 40, 11, 16, 347, 10, 35, 2052,
587, 8, 35, 16, 59, 8, 11, 8, 35, 16, 331, 8, 35, 16, 267, 8, 35, 16, 59, 8,
11, 8, 35, 16, 123, 8, 459, 8, 35, 16, 539, 16, 27, 74, 163, 24, 131, 82, 48, 691,
16, 51, 16, 10, 4963, 18, 139, 8, 211, 18, 24, 603, 26, 91, 56, 179, 72, 179, 18, 72,
163, 96, 107, 8, 27, 8, 19, 96, 675, 26, 11, 34, 19, 16, 83, 48, 83, 48, 90, 27,
8, 91, 48, 715, 56, 347, 40, 563, 80, 251, 8, 99, 32, 99, 32, 10, 24, 18, 323, 16,
43, 88, 355, 32, 211, 48, 91, 24, 274, 227, 16, 18, 507, 8, 235, 16, 91, 48, 83, 48,
58, 11, 50, 16, 251, 392, 619, 24, 83, 138, 75, 90, 8, 931, 64, 34, 451, 24, 42, 83,
24, 395, 18, 75, 56, 347, 16, 27, 66, 64, 27, 10, 315, 40, 4275, 16, 51, 16, 307, 16,
51, 16, 67, 8, 11, 8, 11, 8, 11, 8, 251, 16, 427, 8, 59, 10, 11, 26, 27, 8,
59, 26, 35, 16, 51, 8, 26, 107, 26, 16, 27, 8, 59, 18, 136, 194, 17, 48, 378, 136,
19, 16, 51, 42, 91, 42, 8, 107, 24, 266, 120, 267, 120, 18, 11, 34, 11, 18, 83, 10,
11, 26, 43, 50, 11, 10, 11, 10, 11, 10, 35, 10, 91, 18, 35, 42, 43, 34, 11, 10,
467, 18, 32, 5306, 200, 90, 168, 483, 626, 179, 5042, 243, 7938, 16, 258, 8, 842, 1835, 50, 75,
40, 34, 11, 18, 307, 8, 11, 40, 11, 16, 451, 56, 11, 10, 112, 195, 72, 59, 8, 59,
8, 59, 8, 59, 8, 59, 8, 59, 8, 59, 8, 59, 8, 259, 378, 11, 370, 272, 210, 8,
714, 96, 1714, 208, 130, 8, 34, 28, 202, 124, 10, 44, 18, 44, 26, 8, 692, 16, 20, 18,
28, 10, 724, 10, 36, 40, 348, 8, 756, 8, 18, 36, 82, 260, 290, 88, 10, 132, 250, 8,
84, 242, 68, 10, 124, 258, 84, 314, 124, 2562, 52740, 514, 65532, 65532, 46204, 24, 442, 72, 371, 18,
2155, 26, 227, 160, 411, 10, 83, 10, 923, 50, 64, 186, 75, 18, 827, 18, 515, 40, 19, 8,
11, 8, 43, 192, 435, 34, 11, 24, 51, 34, 48, 419, 34, 64, 563, 64, 18, 83, 48, 195,
26, 11, 10, 395, 18, 291, 88, 10, 236, 24, 523, 106, 8, 91, 32, 18, 251, 8, 443, 72,
115, 16, 83, 16, 34, 187, 26, 587, 192, 27, 18, 131, 18, 43, 80, 51, 16, 51, 16, 51,
72, 59, 8, 59, 8, 347, 10, 115, 18, 32, 987, 10, 19, 16, 83, 48, 65532, 23852, 96, 188,
32, 396, 65528, 2088, 2932, 16, 852, 304, 59, 96, 43, 40, 99, 10, 107, 8, 43, 8, 11, 8,
19, 8, 19, 8, 867, 138, 128, 2907, 146, 515, 16, 435, 56, 10, 256, 99, 34, 131, 82, 48,
131, 282, 8, 154, 8, 34, 32, 43, 8, 1083, 32, 122, 83, 58, 211, 50, 211, 90, 716, 24,
52, 16, 52, 16, 52, 16, 28, 24, 58, 8, 58, 104, 18, 16,
};

}

const uint8_t CharClassify::CharClassifyTable[] = {
// CharClassifyTable index 1
0, 8, 16, 24, 32, 40, 48, 56, 64, 56, 56, 56, 56, 72, 80, 80, 88, 96, 56, 56,
56, 104, 112, 120, 56, 128, 136, 144, 152, 160, 168, 176, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 184, 80, 192, 200, 80, 208, 80, 80,
80, 216, 56, 224, 80, 80, 232, 80, 240, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 248, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
// CharClassifyTable index 2
0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 10, 11, 12, 13, 14, 2, 2, 15, 16,
17, 18, 19, 8, 2, 2, 2, 2, 20, 21, 22, 8, 23, 24, 25, 26, 27, 8, 28, 29,
30, 31, 32, 33, 34, 35, 36, 8, 2, 37, 38, 39, 40, 8, 8, 8, 8, 41, 42, 43,
17, 44, 45, 46, 2, 47, 48, 49, 50, 51, 2, 52, 53, 54, 55, 56, 57, 58, 8, 8,
2, 59, 2, 60, 8, 8, 61, 62, 2, 63, 64, 65, 66, 67, 8, 8, 68, 8, 69, 70,
71, 72, 73, 74, 75, 76, 77, 78, 79, 8, 8, 8, 80, 81, 82, 8, 83, 84, 85, 8,
8, 8, 8, 86, 87, 88, 89, 90, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 91, 8, 2, 92, 2, 2, 2, 93, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 94, 95, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 96, 97, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 2, 2, 2, 2, 2, 2, 2,
2, 67, 8, 8, 8, 8, 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 78, 98, 99, 100,
101, 102, 103, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 104, 8, 2, 105, 106, 107,
108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
108, 108, 108, 109, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
108, 108, 108, 110, 111, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 112, 108, 108, 108, 108, 113, 114, 108, 108, 108, 108, 108, 115,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 116, 117, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
118, 119, 120, 121, 120, 120, 120, 122, 123, 124, 125, 126, 120, 127, 8, 128, 120, 129, 8, 8,
2, 130, 131, 132, 133, 134, 2, 2, 2, 2, 135, 136, 137, 138, 139, 140, 120, 120, 120, 120,
120, 120, 120, 120, 141, 142, 143, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 144, 8, 8, 8, 145, 146, 147, 8, 148, 149, 8, 8, 8, 8, 150, 151,
8, 8, 8, 8, 8, 8, 8, 152, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 153,
2, 2, 2, 154, 2, 155, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 156, 157, 8,
158, 8, 8, 8, 159, 160, 161, 162, 8, 8, 8, 8, 163, 120, 164, 165, 166, 120, 167, 168,
169, 170, 8, 8, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 171,
120, 172, 120, 173, 174, 175, 176, 8, 120, 120, 120, 120, 120, 177, 178, 179, 120, 120, 180, 181,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 108, 108, 108, 108,
108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
108, 108, 108, 182, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 183, 108, 108, 108,
184, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 185, 108,
108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 186,
108, 108, 108, 108, 108, 108, 108, 108, 108, 187, 8, 8, 8, 8, 8, 8, 108, 108, 108, 108,
108, 108, 108, 108, 187, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
108, 188, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 189, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 2, 2, 96,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8,
// CharClassifyTable index 3
0, 1, 0, 0, 2, 0, 0, 3, 0, 4, 0, 4, 5, 5, 5, 5, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 8, 9,
0, 0, 0, 0, 0, 0, 0, 10, 9, 11, 9, 12, 13, 5, 5, 5, 5, 5, 9, 9,
9, 9, 9, 14, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 15, 0, 0, 0, 0,
0, 0, 16, 5, 0, 0, 0, 17, 0, 0, 0, 0, 17, 18, 0, 0, 0, 6, 0, 0,
0, 0, 0, 6, 0, 0, 0, 19, 0, 0, 0, 0, 17, 0, 20, 5, 5, 5, 5, 5,
0, 0, 0, 4, 0, 21, 0, 0, 0, 0, 17, 0, 0, 0, 0, 17, 0, 0, 0, 0,
0, 5, 0, 0, 0, 0, 0, 0, 17, 22, 0, 23, 0, 23, 3, 0, 24, 0, 24, 25,
0, 0, 0, 0, 0, 0, 2, 5, 0, 0, 4, 5, 0, 5, 5, 5, 26, 0, 0, 0,
0, 0, 27, 6, 4, 27, 0, 0, 0, 0, 26, 28, 0, 0, 19, 0, 0, 0, 29, 30,
0, 0, 0, 2, 31, 0, 5, 5, 5, 5, 5, 5, 0, 0, 32, 33, 0, 0, 0, 8,
0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 36, 0, 0, 0, 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116, 5, 38, 0, 0, 0, 0, 66, 0, 4, 1, 0, 0, 0, 117, 38, 23, 118,
119, 120, 117, 121, 117, 23, 23, 122, 0, 24, 0, 17, 123, 24, 0, 17, 5, 5, 5, 5,
5, 5, 45, 5, 9, 9, 9, 9, 9, 96, 9, 9, 9, 9, 96, 5, 9, 40, 41, 9,
41, 9, 41, 9, 9, 9, 47, 5, 0, 44, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 47, 5, 5, 5, 5, 5, 5, 124, 9, 9, 9, 76, 5, 9, 9, 9, 9, 9, 96,
9, 13, 45, 5, 47, 5, 5, 5, 9, 9, 9, 125, 9, 12, 9, 12, 9, 9, 9, 9,
9, 9, 40, 126, 9, 9, 9, 45, 9, 96, 13, 5, 9, 96, 9, 9, 9, 9, 9, 9,
9, 5, 9, 45, 9, 9, 9, 9, 9, 5, 9, 9, 9, 47, 45, 5, 9, 9, 96, 5,
9, 47, 9, 12, 9, 13, 9, 9, 9, 9, 9, 127, 47, 124, 9, 96, 9, 13, 9, 13,
9, 9, 128, 9, 9, 9, 9, 9, 9, 76, 5, 5, 5, 5, 0, 21, 87, 87, 87, 87,
5, 5, 5, 5, 87, 87, 87, 87, 87, 87, 87, 86, 87, 87, 87, 88, 87, 87, 87, 87,
87, 87, 87, 87, 86, 5, 87, 87, 87, 87, 87, 87, 89, 5, 87, 87, 87, 87, 87, 88,
5, 5, 5, 5, 87, 90, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 5, 5,
// CharClassifyTable values
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 0, 3, 3, 3, 0, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 2, 2, 2, 0,
0, 0, 0, 3, 3, 3, 3, 3, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,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, 0, 2, 3, 3, 2, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2,
2, 3, 3, 3, 3, 3, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 3, 3, 3,
2, 2, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 2, 0, 0, 0, 0, 3, 0,
0, 3, 3, 0, 0, 3, 3, 3, 3, 0, 3, 3, 3, 3, 0, 3, 0, 3, 3, 3,
3, 3, 0, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 0, 3, 0, 3, 2, 3, 3,
3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3,
2, 2, 2, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2,
3, 2, 2, 2, 3, 3, 0, 3, 3, 0, 3, 3, 3, 3, 0, 0, 0, 0, 3, 2,
3, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 3, 0, 0, 0, 0, 3, 3, 0,
3, 0, 0, 3, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3,
0, 3, 0, 3, 0, 3, 3, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 3, 3,
3, 0, 3, 0, 0, 3, 3, 3, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 2, 2,
0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 0, 2, 2, 2, 2, 0, 2, 2, 2, 2,
};
//--Autogenerated -- end of section automatically generated

//grapheme table++Autogenerated -- start of section automatically generated
const uint8_t CharClassify::GraphemeBreakTable[] = {
// GraphemeBreakTable index 1
0, 8, 16, 24, 32, 40, 48, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
64, 72, 80, 88, 96, 104, 112, 56, 56, 56, 56, 120, 128, 136, 144, 152, 56, 56, 160, 56,
56, 56, 56, 56, 56, 168, 56, 56, 56, 56, 56, 56, 56, 56, 56, 176, 56, 184, 192, 200,
208, 216, 224, 232, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 56, 240, 248,
// GraphemeBreakTable index 2
0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 5, 3, 3, 3, 3, 6, 3,
3, 3, 7, 8, 9, 10, 3, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
22, 24, 22, 25, 22, 26, 27, 28, 29, 30, 22, 31, 32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 46, 3, 47, 48, 49, 50, 3, 3, 3, 3, 3, 51, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 52, 53, 54, 55, 56, 3, 57, 3,
58, 3, 3, 3, 59, 60, 61, 62, 63, 64, 65, 66, 67, 3, 3, 68, 3, 3, 3, 4,
3, 3, 3, 3, 3, 3, 3, 3, 69, 70, 3, 71, 72, 3, 73, 3, 3, 3, 3, 3,
74, 3, 75, 76, 3, 3, 3, 77, 3, 3, 78, 79, 80, 81, 82, 81, 83, 84, 85, 3,
3, 3, 3, 3, 86, 3, 3, 3, 3, 3, 3, 3, 87, 88, 3, 3, 3, 3, 3, 89,
3, 90, 3, 91, 3, 3, 3, 3, 3, 3, 3, 3, 92, 3, 93, 3, 3, 3, 3, 3,
3, 3, 94, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 95, 96, 97, 3, 3, 3, 3, 98, 3, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
3, 3, 3, 109, 110, 111, 112, 113, 114, 115, 116, 110, 111, 112, 113, 114, 115, 116, 110, 111,
112, 113, 114, 115, 116, 110, 111, 112, 113, 114, 115, 116, 110, 111, 112, 113, 114, 115, 116, 110,
111, 112, 113, 114, 115, 116, 110, 111, 112, 113, 114, 115, 116, 110, 111, 112, 113, 114, 115, 116,
110, 111, 112, 113, 114, 115, 116, 110, 111, 112, 113, 114, 115, 116, 110, 111, 112, 113, 114, 115,
116, 110, 111, 112, 113, 114, 115, 116, 110, 111, 112, 113, 114, 115, 116, 110, 111, 112, 113, 114,
115, 116, 110, 111, 112, 113, 114, 115, 116, 110, 111, 112, 113, 114, 115, 116, 110, 111, 112, 113,
114, 115, 116, 110, 111, 112, 113, 114, 115, 116, 110, 111, 112, 113, 114, 115, 116, 110, 111, 112,
113, 114, 115, 116, 110, 111, 112, 113, 114, 115, 116, 110, 111, 112, 113, 114, 115, 116, 110, 111,
112, 113, 114, 115, 116, 110, 111, 112, 113, 114, 115, 116, 110, 111, 112, 113, 114, 115, 117, 118,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 119, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 120, 3, 3, 1, 3, 3, 96, 121, 3, 3, 3, 3, 3, 3, 3, 122,
3, 3, 3, 123, 3, 124, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 125, 3, 3, 126, 3, 3, 3, 3,
3, 3, 3, 3, 127, 3, 3, 3, 3, 3, 128, 129, 3, 130, 131, 3, 132, 133, 134, 135,
136, 137, 138, 139, 140, 141, 3, 142, 32, 143, 3, 3, 144, 145, 61, 146, 3, 3, 147, 148,
61, 149, 150, 3, 151, 3, 3, 3, 152, 3, 3, 3, 153, 154, 3, 155, 156, 157, 158, 3,
3, 3, 3, 3, 159, 3, 160, 3, 161, 162, 163, 3, 3, 3, 3, 164, 165, 166, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 167, 168, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 169, 170, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 171, 172, 173, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 174, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 175, 176, 3, 3, 3, 3, 3, 3, 3, 177, 178, 3, 3, 179, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 180, 181, 182, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 183, 3, 184, 3, 170, 3, 3, 3,
3, 3, 185, 186, 3, 3, 3, 3, 3, 3, 3, 186, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 187, 3, 188, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 81, 81, 81, 81,
189, 190, 191, 192, 193, 194, 81, 81, 81, 81, 81, 195, 81, 81, 81, 81, 196, 197, 81, 81,
81, 198, 81, 81, 3, 199, 3, 200, 201, 202, 203, 81, 204, 205, 81, 81, 81, 81, 81, 81,
3, 3, 3, 3, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 196,
206, 4, 207, 207, 4, 4, 4, 208, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
207, 207, 207, 207,
// GraphemeBreakTable index 3
0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0,
1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 1, 1, 5, 6, 1, 1, 1, 1, 1, 1, 1, 1, 7, 4,
4, 4, 4, 8, 9, 1, 1, 1, 1, 1, 1, 1, 10, 1, 4, 11, 1, 1, 1, 1,
1, 5, 4, 4, 1, 1, 12, 1, 1, 1, 13, 14, 15, 16, 1, 1, 1, 17, 18, 1,
1, 1, 4, 4, 4, 19, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 4, 12, 1,
1, 1, 1, 1, 1, 5, 20, 21, 1, 1, 13, 22, 23, 24, 1, 1, 1, 1, 1, 25,
1, 1, 1, 1, 1, 1, 26, 4, 1, 1, 1, 1, 1, 27, 4, 4, 28, 4, 4, 4,
20, 1, 1, 1, 1, 1, 1, 29, 4, 4, 7, 1, 30, 1, 1, 1, 25, 1, 1, 1,
1, 1, 1, 31, 15, 32, 33, 1, 30, 1, 1, 34, 35, 32, 18, 1, 1, 1, 36, 1,
8, 37, 1, 1, 30, 1, 1, 27, 15, 32, 38, 1, 30, 1, 1, 1, 39, 1, 1, 1,
1, 1, 1, 13, 40, 16, 33, 1, 1, 1, 1, 1, 41, 1, 1, 1, 1, 1, 1, 31,
42, 16, 43, 1, 30, 1, 1, 1, 42, 16, 43, 1, 30, 1, 44, 1, 20, 1, 1, 1,
1, 1, 1, 45, 42, 46, 33, 1, 30, 1, 1, 1, 25, 1, 1, 1, 1, 1, 1, 1,
1, 47, 48, 4, 1, 1, 30, 1, 1, 1, 1, 1, 1, 1, 49, 19, 33, 50, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 49, 41, 1, 50, 1, 1, 1, 1, 1, 1,
1, 1, 1, 6, 1, 1, 51, 52, 1, 1, 1, 1, 1, 1, 7, 4, 42, 38, 4, 7,
4, 4, 4, 41, 34, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 38, 4, 53,
1, 1, 13, 54, 12, 1, 55, 1, 56, 21, 1, 21, 1, 1, 1, 1, 57, 57, 57, 57,
57, 57, 57, 57, 57, 57, 57, 57, 58, 58, 58, 58, 58, 58, 58, 58, 58, 59, 59, 59,
59, 59, 59, 59, 59, 59, 59, 59, 1, 1, 1, 38, 1, 1, 1, 1, 1, 1, 60, 1,
1, 1, 61, 1, 1, 1, 30, 1, 1, 1, 30, 1, 1, 1, 1, 1, 1, 1, 62, 4,
4, 4, 20, 21, 1, 1, 1, 1, 1, 63, 1, 1, 1, 1, 1, 1, 43, 1, 1, 1,
1, 18, 1, 1, 1, 1, 1, 1, 4, 20, 4, 20, 1, 1, 33, 20, 1, 1, 1, 1,
1, 1, 38, 50, 64, 4, 4, 15, 1, 1, 1, 1, 1, 1, 4, 4, 4, 50, 1, 1,
1, 1, 1, 1, 41, 1, 1, 1, 1, 1, 62, 4, 41, 1, 1, 1, 1, 5, 20, 1,
19, 1, 1, 1, 7, 65, 1, 1, 1, 1, 1, 1, 13, 4, 20, 1, 1, 1, 1, 1,
62, 4, 4, 1, 1, 1, 66, 4, 4, 67, 68, 6, 1, 69, 1, 1, 1, 70, 1, 71,
1, 72, 1, 1, 0, 0, 1, 1, 1, 1, 4, 4, 4, 4, 12, 1, 1, 1, 1, 1,
73, 1, 1, 72, 1, 1, 74, 75, 1, 76, 1, 1, 1, 1, 1, 77, 1, 78, 1, 1,
1, 78, 1, 1, 1, 1, 1, 1, 1, 79, 1, 1, 1, 80, 81, 82, 73, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 77, 83, 1, 78, 1, 1, 1, 1, 1, 1, 84,
85, 86, 87, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 88, 1, 86, 86,
86, 86, 86, 86, 88, 86, 89, 90, 72, 78, 91, 1, 92, 93, 94, 1, 95, 1, 1, 1,
1, 1, 96, 1, 72, 1, 78, 79, 1, 1, 1, 1, 1, 1, 97, 1, 96, 1, 1, 91,
1, 1, 1, 1, 1, 1, 98, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 33, 6, 1,
1, 1, 1, 1, 1, 1, 1, 33, 1, 1, 1, 1, 4, 4, 4, 4, 1, 1, 1, 1,
1, 27, 78, 90, 1, 1, 1, 99, 1, 1, 1, 1, 1, 1, 79, 72, 1, 1, 1, 1,
1, 1, 1, 1, 1, 33, 66, 65, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 6, 1, 100, 44, 1, 1, 5, 101, 1, 1, 6, 1, 1, 1, 1, 1, 62, 4,
65, 1, 1, 1, 4, 4, 6, 33, 1, 1, 1, 1, 13, 65, 1, 1, 33, 4, 20, 1,
57, 57, 57, 102, 20, 1, 1, 1, 1, 1, 5, 4, 12, 1, 1, 1, 21, 1, 1, 1,
1, 1, 1, 1, 1, 7, 50, 1, 44, 103, 1, 1, 1, 1, 1, 101, 1, 1, 1, 1,
1, 1, 104, 105, 18, 1, 1, 1, 1, 5, 43, 1, 1, 1, 1, 1, 5, 106, 1, 1,
107, 108, 108, 109, 108, 108, 108, 107, 108, 108, 109, 108, 108, 108, 107, 108, 108, 109, 108, 108,
108, 107, 108, 108, 109, 108, 108, 108, 107, 108, 108, 109, 108, 108, 108, 107, 108, 108, 109, 108,
108, 108, 107, 108, 108, 109, 108, 108, 108, 107, 108, 108, 109, 108, 108, 108, 108, 107, 108, 108,
110, 1, 58, 58, 111, 112, 59, 59, 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, 1, 1, 1, 1, 53, 129, 130, 1, 1, 1,
1, 1, 1, 1, 1, 131, 22, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 132, 1,
133, 1, 1, 1, 1, 1, 62, 40, 19, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 0, 0, 134, 4, 65, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 41, 1,
1, 1, 1, 1, 1, 1, 50, 1, 1, 33, 7, 4, 4, 4, 4, 4, 4, 33, 19, 1,
1, 1, 1, 1, 1, 1, 1, 1, 101, 1, 6, 1, 1, 1, 1, 43, 114, 1, 1, 1,
4, 4, 4, 4, 4, 65, 4, 4, 50, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
38, 135, 136, 137, 138, 20, 1, 1, 1, 60, 1, 1, 61, 1, 1, 1, 1, 1, 1, 1,
4, 4, 4, 4, 4, 4, 50, 5, 4, 4, 4, 4, 4, 41, 21, 1, 101, 1, 1, 5,
7, 4, 1, 1, 50, 4, 4, 139, 140, 19, 1, 1, 1, 33, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 34, 1, 1, 1, 1, 1, 1, 1, 62, 1, 1, 1, 1, 50, 1,
1, 1, 1, 1, 62, 19, 1, 1, 1, 1, 1, 1, 1, 96, 1, 1, 1, 79, 1, 1,
1, 1, 1, 1, 1, 74, 75, 141, 1, 83, 80, 82, 1, 96, 86, 86, 86, 86, 86, 86,
142, 143, 143, 143, 80, 86, 1, 73, 1, 79, 144, 87, 1, 80, 86, 86, 86, 86, 86, 86,
86, 86, 86, 86, 86, 86, 86, 145, 86, 86, 86, 86, 86, 86, 86, 88, 141, 86, 86, 86,
86, 86, 86, 86, 86, 86, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 74, 86,
1, 1, 96, 86, 86, 86, 86, 86, 1, 74, 1, 1, 1, 1, 1, 1, 1, 86, 1, 144,
1, 1, 1, 1, 1, 86, 1, 1, 1, 141, 86,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0, 0, 13,
0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 0, 0, 0, 0, 13, 13, 13, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 13, 13, 13, 13, 0,
13, 13, 13, 13, 13, 13, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 0,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 0, 0, 13, 13, 13, 0, 13, 0, 13, 0,
0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 13, 13, 0, 0, 0, 0, 0, 0, 0,
13, 0, 0, 13, 0, 0, 0, 0, 13, 0, 13, 0, 0, 0, 0, 13, 13, 13, 0, 13,
0, 0, 0, 13, 13, 13, 13, 13, 0, 0, 0, 0, 0, 13, 13, 13, 0, 0, 0, 0,
13, 13, 0, 0, 13, 0, 0, 0, 0, 13, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0,
0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0, 8, 8, 8, 8,
8, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 4, 0, 4, 4, 4, 0, 0, 4,
4, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 0, 4, 4, 0, 0, 11, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, 12, 12,
12, 12, 12, 12, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 10,
10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 3, 3, 3, 3, 0, 0, 0, 0,
0, 4, 4, 4, 0, 4, 4, 0, 0, 0, 0, 4, 4, 0, 0, 0, 4, 0, 0, 4,
4, 0, 0, 0, 4, 4, 4, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0,
4, 0, 6, 6, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 4, 4, 0, 0, 4, 4,
0, 0, 4, 4, 4, 0, 0, 4, 4, 4, 4, 6, 4, 6, 4, 4, 0, 0, 0, 0,
4, 0, 0, 0, 4, 0, 0, 0, 4, 4, 6, 4, 4, 4, 4, 0, 0, 0, 0, 0,
6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 4, 0, 0, 4, 0, 4, 4, 0, 4,
4, 4, 4, 4, 4, 4, 6, 4, 0, 0, 4, 4, 4, 4, 4, 0, 0, 0, 0, 4,
4, 4, 4, 0, 4, 4, 6, 4, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 4,
4, 4, 0, 0, 0, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4,
4, 4, 4, 4, 4, 4, 4, 0, 0, 4, 4, 4, 4, 0, 0, 4, 4, 4, 4, 4,
4, 4, 0, 4, 4, 0, 4, 4, 0, 0, 0, 0, 0, 0, 13, 13, 13, 13, 13, 13,
13, 13, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 13, 13, 13, 13, 13, 13,
13, 13, 13, 4, 4, 4, 4, 4,
};
//grapheme table--Autogenerated -- end of section automatically generated

uint8_t CharClassify::classifyMap[0xffff + 1];

void CharClassify::InitUnicodeData() noexcept {
	ExpandRLE3(CharClassifyRLE_BMP, classifyMap);
}

namespace {

//dbcs++Autogenerated -- start of section automatically generated
// Created with Python 3.13.0, Unicode 15.1.0
const uint16_t CharClassifyRLE_CP932[] = {
264, 122, 83, 58, 211, 50, 211, 34, 264, 12, 42, 468, 232, 28, 65528, 65528, 65528, 65528, 552, 138,
36, 10, 44, 282, 8, 394, 60, 450, 11, 98, 536, 122, 83, 58, 211, 10, 19, 10, 11, 8,
10, 211, 34, 692, 600, 508, 8, 188, 64, 195, 66, 283, 82, 84, 8, 52, 536, 267, 122, 123,
8, 147, 36, 18, 27, 290, 244, 64, 66, 115, 552, 10, 8, 34, 11, 10, 8, 18, 19, 18,
19, 10, 27, 10, 331, 8, 259, 10, 83, 10, 67, 10, 267, 10, 307, 536, 283, 8, 27, 64,
67, 10, 59, 8, 42, 16, 83, 10, 363, 410, 72, 18, 536, 251, 186, 11, 56, 10, 8, 250,
756, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8,
1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8,
1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8,
1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8,
1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 65528, 65528, 552,
508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536,
508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536,
508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536,
508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536,
508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536,
508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 940, 6232,
};

const uint16_t CharClassifyRLE_CP936[] = {
264, 122, 83, 58, 211, 50, 211, 34, 65528, 65528, 65528, 65528, 1576, 508, 8, 1020, 520, 508, 8, 1020,
520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020,
520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020,
520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020,
520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020,
520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020,
520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020,
520, 508, 8, 268, 8, 26, 19, 18, 12, 682, 520, 508, 8, 268, 83, 48, 403, 16, 84, 16,
99, 536, 508, 8, 268, 122, 83, 58, 211, 50, 211, 34, 520, 508, 8, 932, 608, 508, 8, 956,
584, 508, 8, 268, 195, 64, 195, 56, 98, 16, 42, 8, 18, 592, 508, 8, 268, 267, 120, 267,
624, 19, 490, 8, 178, 88, 219, 8, 19, 8, 11, 32, 300, 688, 76, 122, 8, 18, 8, 10,
24, 12, 18, 44, 186, 8, 74, 104, 12, 104, 610, 640, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 980, 560, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 132, 648, 756, 2056,
};

const uint16_t CharClassifyRLE_CP949[] = {
264, 122, 83, 58, 211, 50, 211, 34, 65528, 65528, 65528, 65528, 1584, 212, 48, 212, 48, 1012, 528, 212,
48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212,
48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012,
528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212,
48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212,
48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012,
528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212,
48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212,
48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012,
528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212,
48, 212, 48, 1012, 528, 212, 48, 212, 48, 260, 8, 58, 8, 258, 11, 418, 528, 212, 48, 212,
48, 260, 50, 11, 66, 11, 442, 712, 212, 48, 212, 48, 260, 122, 83, 58, 211, 50, 211, 34,
528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 260, 83, 40, 83, 56, 195, 64, 195, 576,
212, 48, 212, 48, 260, 546, 736, 212, 48, 212, 48, 260, 26, 11, 418, 11, 178, 648, 212, 48,
212, 48, 260, 35, 8, 11, 8, 67, 8, 434, 195, 528, 212, 48, 212, 48, 260, 131, 434, 195,
528, 212, 48, 212, 48, 924, 616, 212, 48, 212, 48, 948, 592, 212, 48, 212, 48, 260, 267, 120,
267, 632, 212, 48, 212, 48, 260, 1280, 212, 48, 212, 48, 260, 1280, 212, 48, 212, 48, 260, 1280,
212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48,
212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48,
1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528,
212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48,
212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48,
1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528,
212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 148, 624, 756, 1296, 756, 1296, 756, 3344,
756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296,
756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296,
756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296,
756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296,
756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296,
756, 1296, 756, 4104,
};

const uint16_t CharClassifyRLE_CP950[] = {
264, 122, 83, 58, 211, 50, 211, 34, 65528, 65528, 65528, 65528, 1576, 65020, 528, 498, 272, 290, 11, 458,
520, 202, 76, 234, 272, 114, 163, 100, 387, 520, 419, 92, 272, 212, 10, 35, 508, 520, 508, 272,
756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272,
756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272,
756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272,
756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272,
756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272,
756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272,
756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 2708, 83, 2068, 520,
508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520,
508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520,
508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520,
508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520,
508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520,
508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520,
508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520,
508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520,
508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520,
508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 10996, 2056,
};

constexpr int CharClassify_CP1361IndexBit = 6;
constexpr int CharClassify_CP1361BlockBit = 5;

const uint16_t CharClassify_CP1361Index[] = {
64, 65, 66, 67, 65472, 1984, 68, 325, 128, 389, 128, 389, 128, 261, 256, 69, 326, 128, 390, 128,
390, 128, 262, 256, 69, 326, 128, 390, 128, 390, 128, 262, 256, 69, 326, 128, 390, 128, 390, 128,
262, 256, 69, 326, 128, 390, 128, 390, 128, 262, 256, 69, 326, 128, 390, 128, 390, 128, 262, 256,
69, 326, 128, 390, 128, 390, 128, 262, 256, 69, 326, 128, 390, 128, 390, 128, 262, 256, 69, 326,
128, 390, 128, 390, 128, 262, 256, 69, 326, 128, 390, 128, 390, 128, 262, 256, 69, 326, 128, 390,
128, 390, 128, 262, 256, 69, 326, 128, 390, 128, 390, 128, 262, 256, 69, 326, 128, 390, 128, 390,
128, 262, 256, 69, 326, 128, 390, 128, 390, 128, 262, 256, 69, 326, 128, 390, 128, 390, 128, 262,
256, 69, 326, 128, 390, 128, 390, 128, 262, 256, 69, 326, 128, 390, 128, 390, 128, 262, 256, 69,
326, 128, 390, 128, 390, 128, 262, 256, 69, 326, 128, 390, 128, 390, 128, 262, 256, 69, 326, 128,
390, 128, 390, 128, 262, 2752, 71, 72, 73, 74, 75, 76, 77, 64, 74, 78, 79, 80, 81, 82,
83, 64, 84, 85, 86, 84, 87, 76, 88, 64, 89, 76, 90, 91, 92, 76, 93, 64, 94, 95,
96, 94, 97, 98, 99, 64, 100, 98, 83, 101, 102, 103, 104, 576, 100, 98, 83, 100, 162, 83,
64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162,
83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100,
162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83,
100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98,
83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100,
98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64,
100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83,
64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162,
83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 3072,
};

const uint8_t CharClassify_CP1361Data[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
//dbcs--Autogenerated -- end of section automatically generated
}

DBCSCharClassify::DBCSCharClassify(int codePage_) noexcept {
	switch (codePage_) {
	case 932: {
		// Shift-JIS
		constexpr uint8_t BytesRLE_CP932[] = {252, 4, 254, 4, 6, 127, 254, 6, 119, 12,};
		ExpandRLE2(BytesRLE_CP932, leadByte);

		ExpandRLE3(CharClassifyRLE_CP932, classifyMap);
	} break;

	case 936: {
		// GBK
		constexpr uint8_t BytesRLE_CP936[] = {252, 4, 254, 4, 6, 255, 255, 4,};
		ExpandRLE2(BytesRLE_CP936, leadByte);

		ExpandRLE3(CharClassifyRLE_CP936, classifyMap);
	} break;

	case 949: {
		// Korean Unified Hangul Code, Wansung KS C-5601-1987
		constexpr uint8_t BytesRLE_CP949[] = {252, 8, 106, 24, 106, 24, 255, 255, 4,};
		ExpandRLE2(BytesRLE_CP949, leadByte);

		ExpandRLE3(CharClassifyRLE_CP949, classifyMap);
	} break;

	case 950: {
		// Big5
		constexpr uint8_t BytesRLE_CP950[] = {252, 4, 254, 8, 129, 255, 127, 4,};
		ExpandRLE2(BytesRLE_CP950, leadByte);

		ExpandRLE3(CharClassifyRLE_CP950, classifyMap);
	} break;

	default: {
		// Korean Johab, KS C-5601-1992
		constexpr uint8_t BytesRLE_CP1361[] = {196, 254, 62, 8, 14, 255, 71, 18, 31, 6, 107, 22, 4,};
		ExpandRLE2(BytesRLE_CP1361, leadByte);

		ExpandRunBlock(CharClassify_CP1361Index, CharClassify_CP1361Data, classifyMap,
			CharClassify_CP1361IndexBit, CharClassify_CP1361BlockBit);
	} break;
	}
}
